/******************************************************************************* 
 * Copyright (c) 2008 xored software, Inc.  
 * 
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Eclipse Public License v1.0 
 * which accompanies this distribution, and is available at 
 * http://www.eclipse.org/legal/epl-v10.html  
 * 
 * Contributors: 
 *     xored software, Inc. - initial API and Implementation (Yuri Strot) 
 *******************************************************************************/
package com.xored.glance.search.engine;


/**
 * @author Yuri Strot
 * 
 */
public class Match {

	private ISearchUnit unit;
	private int length;
	private int offset;

	/**
	 * @param unit
	 * @param length
	 * @param offset
	 */
	public Match(ISearchUnit unit, int offset, int length) {
		this.unit = unit;
		this.offset = offset;
		this.length = length;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.xored.glance.core.IMatch#getTextBlock()
	 */
	public ISearchUnit getSearchUnit() {
		return unit;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.xored.glance.core.IMatch#getLength()
	 */
	public int getLength() {
		return length;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.xored.glance.core.IMatch#getOffset()
	 */
	public int getOffset() {
		return offset;
	}

}
